package com.example.sourcesprng.jdk8._lambda._consumer;

import java.util.function.Consumer;

public class ConsumerTest {

    public static void main(String[] args) {
        consumerTest("success", (param) -> {
            System.out.println(param);
            param = param.toUpperCase();
            param = "good" + param;
            System.out.println(param);
        }, (param) -> {
            System.out.println(param);
            param = param.toUpperCase();
            param = "good" + param;
            System.out.println(param);
        });
    }


    public static void consumerTest(String param, Consumer<String> consumer, Consumer<String> consumer2) {
//        consumer.accept(param);
//        consumer2.accept(param);

        consumer.andThen(consumer2).accept(param);
    }
}
